package com.fpt.quanlyhethongsan.utils;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class JDBCConnector {
	public static final String USERNAME = "fpt";
	public static final String PASSWORD = "fpt123";

	public static Connection getConnection() {
		Connection conn = null;
		try {
			String URL = "jdbc:jtds:sqlserver://localhost:1433/QuanLySanBong";

			Class.forName("net.sourceforge.jtds.jdbc.Driver");

			conn = DriverManager.getConnection(URL, USERNAME, PASSWORD);

		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return conn;
	}
}
